home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 2 / AACD 2.iso / AACD / Magazine / GraphicsCards / StormMesa / mklib.irix5 < prev    next >
Text File  |  1998-12-15  |  2KB  |  60 lines

  1. #!/bin/sh
  2.  
  3. # Make an IRIX 5.x DSO
  4.  
  5. #--identification------------------------------------------------------
  6.  
  7. # $Id: mklib.irix5,v 1.4 1997/10/21 23:32:31 brianp Exp $
  8.  
  9. # $Log: mklib.irix5,v $
  10. # Revision 1.4  1997/10/21 23:32:31  brianp
  11. # now takes major and minor version arguments
  12. #
  13. # Revision 1.3  1997/05/09 22:38:27  brianp
  14. # added -lm to OBJECTS per Ronald Aarts
  15. #
  16. # Revision 1.2  1996/09/26 22:37:34  brianp
  17. # replaced /usr/lib/libXext.a with -lXext
  18. #
  19.  
  20. #--common--------------------------------------------------------------
  21.  
  22. # Usage:  mklib libname major minor file.o ...
  23. #
  24. # First argument is name of output library (LIBRARY)
  25. # Second arg is major version number (MAJOR)
  26. # Third arg is minor version number (MINOR)
  27. # Rest of arguments are object files (OBJECTS)
  28.  
  29. LIBRARY=$1
  30. shift 1
  31.  
  32. MAJOR=$1
  33. shift 1
  34.  
  35. MINOR=$1
  36. shift 1
  37.  
  38. OBJECTS=$*
  39.  
  40. #--platform------------------------------------------------------------
  41.  
  42. # This is a bit of a kludge, but...
  43. if test ${LIBRARY} = "libMesaGL.so" ; then
  44.     # must add libXext.a to MesaGL.so in case one relinks a precompiled
  45.     # OpenGL program which wasn't linked with -lXext or -lm.
  46.     OBJECTS="${OBJECTS} -lXext -lm"
  47. fi
  48.  
  49.  
  50. ld -shared -all -o ${LIBRARY} ${OBJECTS}
  51.  
  52.  
  53. # You may want to add the following to the ld line:
  54. #   -soname <path>$LIBNAME
  55. #
  56. # where LIBNAME=`basename $LIBRARY` and <path> is where you're going to
  57. # put Mesa's libraries.  This may solve problems with the runtime
  58. # loader/linker (rld) not being able to find the library.
  59. # For example:  -soname /usr/local/lib/$LIBNAME
  60.